<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;

/**
 * Class GoodsSkuAttribute
 * 
 * @property int $id
 * @property int|null $goods_id
 * @property string|null $attribute_name
 * @property int|null $stock
 * @property float|null $price
 * @property float|null market_price
 * @property float|null $partner_price
 * @property float|null $distributor_price
 * @property string|null $sku_images
 * @property string|null $weight
 * @property Carbon|null $create_at
 * @property Carbon|null $update_at
 * @property Carbon|null $delete_at
 *
 * @package App\Models
 */
class GoodsSkuAttribute extends BaseModels
{
	protected $table = 'zh_goods_sku_attribute';

	protected $dates = [
		'create_at',
		'update_at',
		'delete_at'
	];

	protected $fillable = [
		'goods_id',
		'attribute_name',
		'stock',
		'price',
        'market_price',
        'partner_price',
        'distributor_price',
		'sku_images',
        'weight',
		'create_at',
		'update_at',
		'delete_at'
	];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne|Good
     */
	public function goods()
    {
        return $this->hasOne(Good::class,'id', 'goods_id');
    }
}
